import request from "../../utils/request";

export function createOrder(data) {
    return request.post({
        url: `/order`,
        data: data
    });
}

export function payTicketOrder(id) {
    return request.post({
        url: `/order/pay/${id}`,
    });
}

export function getOrderInfo(id) {
    return request.get({
        url: `/order/${id}`,
    });
}

export function getOrderList(params) {
    return request.get({
        url: `/order/list/user`,
        params: params
    });
}

export function cancelOrder(id) {
    return request.put({
        url: `/order/cancel/${id}`,
    });
}
